<template>
	<div id="main"  style="width: 100%;">
		<div ref="main" style="width: 500px;height: 500px;margin: 20px auto;"></div>

	</div>
</template>

<script>
	import * as echarts from 'echarts';
	export default{
		data(){
			return{
				option:{
					  title: {
						text: '文章类型雷达图'
					  }, 
					  radar: {
						// shape: 'circle',
						indicator: [
						  { name: 'JavaScript', max: 10 },
						  { name: 'HTMLCSS', max: 10 },
						  { name: 'VUE', max: 10 },
						  { name: 'java', max: 10 },
						  { name: 'Git', max: 10 }
						]
					  },
					  series: [
						{
						  name: 'Budget vs spending',
						  type: 'radar',
						  data: [
							{
							  value: [9, 7, 7, 4, 8]
							}
						  ]
						}
					  ]
					}
			}
		},
		mounted(){
			this.initEcharts();
			this.getTypeDate();
		}, 
		methods:{
			getTypeDate(){
				this.$axios.post("/bloginfo").then(res => {
						this.option.series[0].data[0].value = [9, 7, 7, 4, 8]
						// console.log(this.option.series[0].data[0].value);
						// this.$forceUpdate()
				})
			},
			initEcharts(){
				let myChart = echarts.init(this.$refs.main);
				myChart.setOption(this.option);
			}
		},

	} 
</script>

<style scoped> 

 
</style>
